<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>清除数据</title>
</head>
<body>
<button id="btn-clear">清除数据</button>
<script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script>
    $("#btn-clear").click(function () {
        $.post("/clear", function (res) {
            alert(res.msg);
        }, 'json');
    });
</script>
</body>
</html>